#pragma once

#include <functional>
#include <vector>

class FrameManager
{
public:
    FrameManager() = default;
    ~FrameManager() = default;
    FrameManager(const FrameManager&) = delete;
    FrameManager& operator = (const FrameManager&) = delete;
public:
    using Func = std::function<void()>;
public:
    void AddFrame(const Func &func)
    {
        func_list_.emplace_back(func);
    }
    void Run()
    {
        for (auto &f: func_list_)
        {
            if (f)
            {
                f();
            }
        }
        //func_list_.clear();
    }
private:
    std::vector<Func> func_list_;
};